﻿using System.Windows;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.UnityExtensions;

namespace Pem.Wpf.Shell
{
    public class Bootstrapper : UnityBootstrapper
    {
        protected override DependencyObject CreateShell()
        {
            var shell = new Shell();
            shell.Show();
            return shell;
        }

        protected override IModuleCatalog GetModuleCatalog()
        {
            //register modules
            //Container.RegisterType(typeof(IHomeModule), typeof(HomeModule));
            //Container.RegisterType(typeof(IContactModule), typeof(ContactModule));
            //Container.RegisterType(typeof(ISmsModule), typeof(SmsModule));

            ////register global controls
            //Container.RegisterType(typeof(IDialogPresenter), typeof(DialogPresenter));
            //Container.RegisterType(typeof(IDialogView), typeof(DialogView));

            ////Register all the datatypes
            //Container.RegisterType(typeof(IPerson), typeof(Person));

            ////register business layer stuff
            //Container.RegisterType(typeof(IPersonManager), typeof(PersonManager));
            //Container.RegisterType(typeof(IPersonDal), typeof(PersonDal));


            var catalog = new ModuleCatalog();
            //catalog.AddModule(typeof(IHomeModule));
            //catalog.AddModule(typeof(IContactModule));
            //catalog.AddModule(typeof(ISmsModule));

            return catalog;
        }
    }
}